package edu.princeton.cogsci.wn;

/**
 *  This class models a relation between semantic entries, or synsets.
 *
 */

public class SemanticRelation
{
  /** The type of relation. */
  public int type;

  /** The key identifying the destination semantic entry. */
  public SynsetKey key;

  public SemanticRelation( int type, SynsetKey key )
  {
    this.type = type;
    this.key = key;
  }

  public String toString( )
  {
    return Constants.relationNames[ type ] + ": " + key.toString( );
  }

  public boolean equals( SemanticRelation r )
  {
    return type == r.type && key.equals( r.key );
  }
}
